package com.foreknow.dao;

import com.foreknow.entity.User;

public interface UserMapper {
    /**
     * 根据id删除
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Integer id)throws Exception;
    /**
     * 添加
     * @param record
     * @return
     */
    int insert(User record)throws Exception;

    /**
     * 根据id查询
     * @param id
     * @return
     */
    User selectByPrimaryKey(Integer id)throws Exception;
    /**
     * 根据record更新
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(User record)throws Exception;
    /**
     * 根据record更新
     * @param record
     * @return
     */
    int updateByPrimaryKey(User record)throws Exception;

    /**
     * 根据用户名和密码查询用户
     * @param record
     * @return
     */
    User selectByUserNamePassword(User record)throws Exception;

    /**
     * 根据用户名查询用户
     * @param userName
     * @return
     */
    User selectByUserName(String userName) throws Exception;

}